import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

// An authenticator to see if we can fix an authentication failed exception
// that we seemed to be getting a lot.
// Turns out this didn't really fix it, but by reducing the polling interval
// to 3 seconds we didn't run into the problem anymore.
public class GmailAuthenticator extends Authenticator {
	String username;
	String password;
	
	public GmailAuthenticator(String newUsername, String newPassword) {
		super();
		username = newUsername;
		password = newPassword;
	}
	
	public PasswordAuthentication getPasswordAuthentication() {
		return new PasswordAuthentication(username, password);
	}
}
